create or replace
TRIGGER PIECE_TYPES_TRIGGER
BEFORE INSERT ON PIECE_TYPES
FOR EACH ROW WHEN (NEW.PIECE_TYPES_ID IS NULL)
BEGIN 
	SELECT PIECE_TYPES_SEQ.NEXTVAL 
	INTO :NEW.PIECE_TYPES_ID 
	FROM DUAL;
END;